UML Diagrams

This section shows UML class diagrams for the following:

 

Standard UML notation is used in the diagrams and defined as follows.

 

Class Notation

A UML class diagram is shown in the following image.

 

It is divided into four sections:

  1. First section displays the name of the class. Abstract class names are denoted by italics.
  2. Second section shows the attributes of the class.
  3. Third section displays the operations performed by the class.
  4. Fourth section is optional and is used to show any additional components.

 

Visibility

The visibility of a class member such as an attribute or method is denoted by placing a symbol before the member's name. The following table details the symbols and what they represent.

 

Symbol Description
+ Public
- Private
# Protected
~ Package
/ Derived
underline Static

 

Connections

Association

An association represents a relationship between instances of two classes and is shown as a simple line between them. An association exists between two classes if an instance of a class must know about the second class in order to perform its function.

Extra text annotation may be added at the ends of an association to further explain the nature of the association. These are known as role names.

Aggregation

This is a variant of an association and is more specific. It is an association where one of the classes belongs to a collection. Essentially, an aggregation represents a part-whole or part-of relationship. In UML, it is graphically represented by a hollow diamond shape ¸ pointing to the containing class.

Generalisation

A generalisation indicates an inheritance link connecting a specialised element with a generalised element. For example, indicating that one class is a superclass of another class. In UML, this is represented by a hollow triangle pointing to the superclass r.

 

Multiplicities

Connections are usually annotated with the multiplicity. This indicates the number of possible instances for the class that is associated with a single instance of the other class in the connection. Multiplicities are shown as a single number or a number range. The following table shows the common multiplicities used.

 

Multiplicities Meaning
0..1 Zero or one instance. The annotation pattern is: x..y, meaning x to y instances.
0..* Unlimited instances. This can also be zero.
1 One instance only.
1..* Minimum of one instance or more.

 

Last updated: 23 July 2024

 

 

 

Copyright © 2025 StoneX